package BasicClass;

import javafx.beans.property.*;

public class Book {
    private final SimpleStringProperty ISBN;
    private final SimpleStringProperty Name;
    private final SimpleStringProperty Author;
    private final SimpleStringProperty Press;
    private final SimpleDoubleProperty Price;
    private final SimpleIntegerProperty Stock;
    private final SimpleStringProperty Location;
    private final SimpleStringProperty Label;
    private final SimpleStringProperty Remark;
    public int state;
    public int number;

    public Book(String isbn, String name, String author, String press, int stock, Double price,
                String location, String label, String remark) {
        this.ISBN = new SimpleStringProperty(isbn);
        this.Name = new SimpleStringProperty(name);
        this.Author = new SimpleStringProperty(author);
        this.Press = new SimpleStringProperty(press);
        this.Price = new SimpleDoubleProperty(price);
        this.Stock = new SimpleIntegerProperty(stock);
        this.Location = new SimpleStringProperty(location);
        this.Label = new SimpleStringProperty(label);
        this.Remark = new SimpleStringProperty(remark);
    }

    public String getISBN(){return this.ISBN.get();}
    public void setISBN(String ISBN){this.ISBN.set(ISBN);}
    public String getName(){return this.Name.get();}
    public void setName(String Name){this.Name.set(Name);}
    public String getAuthor(){return this.Author.get();}
    public void setAuthor(String Author){this.Author.set(Author);}
    public String getPress(){return this.Press.get();}
    public void setPress(String Press){this.Press.set(Press);}
    public Double getPrice(){return this.Price.get();}
    public void setPrice(Double Price){this.Price.set(Price);}
    public int getStock(){return this.Stock.get();}
    public void setStock(int Stock){this.Stock.set(Stock);}
    public String getLocation(){return this.Location.get();}
    public void setLocation(String Location){this.Location.set(Location);}
    public String getLabel(){return this.Label.get();}
    public void setLabel(String Label){this.Label.set(Label);}
    public String getRemark(){return this.Remark.get();}
    public void setRemark(String Remark){this.Remark.set(Remark);}
    public int getState(){return this.state;}
    public void setState(int state){this.state = state;}
    public int getNumber(){return this.number;}
    public void setNumber(int number){this.number = number;}

    @Override
    public String toString() {
        return getISBN()+","+getName()+","+getAuthor()+","+getPress()+","+getStock()+","+getPrice()+","
                +getLocation()+","+getLabel()+","+getRemark();
    }
}
